<include file="Public:pagerForm" />
<script type="text/javascript">
function reload2() {
    navTab.reload("__URL__", {});
}
function busdbltable(target,rel){
    if( target == 'sid_business'){
    $.pdialog.open("__URL__/read/id/"+rel+"/sid_business="+rel,"pdialogid", "查看业务", { max:false, mask:true, width: 540, height: 320});
    } 
  }
</script>
<div class="pageHeader" style="height: 50px;">
		<form onsubmit="return navTabSearch(this);" rel="pagerForm"
			action="__URL__" method="post">
			<input type="hidden"  name="start" value="{$start}"/>
			<input type="hidden"  name="end" value="{$end}"/>
			<input type="hidden"  name="userid" value="{$userid}"/>
			<input type="hidden"  name="state" value="{$state}"/>
			<div class="searchBar">
				<table class="searchContent" style="height: 25px;">
					<tr>
					</tr>
				</table>
				<div class="subBar">
					<ul>
							<li><a class="button" href="__URL__/retrieval" target="dialog" mask="true" rel="closeCurrent" title="查询框"><span>查询</span></a></li>
					</ul>
				</div>
			</div>
		</form>
	</div>

<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
		
		<eq name="flag" value="flag">
			<li><a class="add" href="__URL__/add" target="dialog" mask="true" rel="businessAdd" title="添加业务" width="520" height="390"><span>新增</span></a></li>
			<!-- <li><a class="delete" href="__URL__/forbid/id/{sid_business}/navTabId/__MODULE__" target="ajaxTodo" title="你确定要作废吗？"><span>作废</span></a></li> -->
			</eq>
			<eq name="user" value="1">
			<li><a class="delete" href="__URL__/delete/navTabId/__MODULE__" target="selectedTodo" postType="string" title="你确定要删除吗？"><span>删除</span></a></li>
			<li><a class="edit" href="__URL__/edit/id/{sid_business}" target="dialog" mask="true" rel="businessEdit" title="修改业务"  width="520" height="400"><span>修改</span></a></li>
			</eq>
			 <li><a class="add" href="__URL__/read/id/{sid_business}" target="dialog" mask="true" width="600" hidden="200" height="320" title="查看" ><span>查看</span></a></li>
			<!--  <li><a class="add" href="__URL__/draft/id/{sid_business}" target="dialog" mask="true" width="540" rel="draft" title="拟定合同"><span>拟定合同</span></a></li>-->
			<li class="line">line</li>
			<li><a class="icon" href="__URL__/export/start/{$start}/end/{$end}/userid/{$userid}/state/{$state}" target="dwzExport" targetType="navTab" title="确定要导出这些记录吗?"><span>导出EXCEL</span></a></li>
			<li><a class="icon" href="#" onclick="reload2()"><span>刷新</span></a></li>
			<li><a class="icon" href="__URL__/trash" target="navTab" mask="true" rel="business_trash" title="回收站" width="540" height="320"><span>回收站</span></a></li>
		</ul>
	</div>
	<table class="table" width="100%" layoutH="136">
		<thead>
			<tr>
			    <th width="20" align="center"><input type="checkbox" group="ids" class="checkboxCtrl"></th>	
				<th width="110" align="center">公司名称</th>
				<th width="80" align="center">联系人</th>
				<th width="80" align="center">电话</th>
				<th width="120" align="center">地址</th>
				<!-- <th width="100" align="center">购买意向</th> 
				<th width="80" align="center">购买产品名称</th>
				<th width="70" align="center">产品单价/吨</th>
				<th width="70" align="center">购买数量/吨</th>-->
				<th width="70" align="center">业务员</th>
				<th width="120" align="center">备注</th>
				<th width="120" align="center">添加记录时间</th>
				<th width="100" align="center">操作</th>
			</tr>
		</thead>
		<tbody>
		  <volist name="list" id="vo">
			<tr target="sid_business" rel="{$vo.id}" ondblclick="busdbltable('sid_business',{$vo.id})">
			    <td><input type="checkbox" name="ids" value="{$vo.id}" /></td> 
				<td>{$vo.companyname}</td>
				<td>{$vo.linkname}</td>
				<td>{$vo.phone}</td>
				<td>{$vo.address}</td>
				<!-- <td>{$vo.purchaseintention}</td> 
				<td>{$vo.productname}</td>
				<td>{$vo.unit}</td>
				<td>{$vo.quantity}</td>
				<td><eq name="vo.status" value="1">正常<else/>已作废</eq></td>-->
				<volist name="us" id="ur">
				 <eq name="ur.id" value="$vo.userid"><td>{$ur.username}</td></eq>
				</volist>
				
				<td>{$vo.note}</td>
				<td>{$vo.businessdate}</td>
				<td>
				<a class="delete" href="__URL__/foreverdelete/ids/{$vo['id']}/navTabId/__MODULE__" target="ajaxTodo" calback="navTabAjaxMenu" title="你确定要删除吗？"><span>删除</span></a>&nbsp;
				|&nbsp;<a href="__URL__/edit/id/{$vo['id']}" target="dialog" target="dialog" mask="true" title="修改业务" width="520" height="400">编辑</a></td>
			</tr>	
		  </volist>		
		</tbody>	  
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>每页</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<eq name="numPerPage" value="24"><option value="24" selected>24</option><else/><option value="24">24</option></eq>
				<eq name="numPerPage" value="50"><option value="50" selected>50</option><else/><option value="50">50</option></eq>
				<eq name="numPerPage" value="100"><option value="100" selected>100</option><else/><option value="100">100</option></eq>
				<eq name="numPerPage" value="200"><option value="200" selected>200</option><else/><option value="200">200</option></eq>
			</select>
			<span>条，共{$totalCount}条</span>
		</div>
		<div class="pagination" targetType="navTab" totalCount="{$totalCount}" numPerPage="{$numPerPage}" pageNumShown="10" currentPage="{$currentPage}">
		</div>
	</div>
</div>

